/*
 * @Author: sbotlp
 * @Email: sbotlp@sina.com
 * @Date: 2019-11-03 17:24:48
 * @LastEditTime: 2019-11-03 17:32:47
 * @Description: http://www.sbotlp.com.cn
 */
// 动物
function Animal () {
  this.eat = function () {
    console.log('Animal eat');
  }
}
// 狗
function Dog() {
  this.bark = function() {
    console.log('dog bark');
  }
}
// LP
function Lp() {
  this.tiao = function () {
    console.log('LP tiao');
  }
}
// 绑定原型，实现继承
Dog.prototype = new Animal();
var hashiqi = new Dog();
hashiqi.bark();
hashiqi.eat();
Lp.prototype = new Dog();
var lp = new Lp();
lp.tiao();
lp.eat();
lp.bark();